//
//  Item.h
//  Maze1
//
//  Created by Lin Tian on 10/7/11.
//  Copyright 2011 tina. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"

@class Hud;
@class LocalPlayer;

typedef enum{
    speedUp,
    transparent,
    freezing,
}ItemType;

@interface Item : NSObject {
    int _id;
    ItemType _type;
    NSString* _texture;
    CCSprite* sprite;
}

-(id)init;

//these 2 methods should be implemented by subclass
-(bool)initSpriteWithParentNode:(CCNode*)parentNode inPosition:(CGPoint)loc;
-(bool)useItemBy:(LocalPlayer*)player;

@property(nonatomic, assign)int idNum;
@property(nonatomic, assign)ItemType type;
@property(nonatomic, retain)NSString* texture;
@property(nonatomic, retain)CCSprite* sprite;

@end

@interface SpeedUp : Item {
    int deltaSpeed;
    LocalPlayer* _player;
}

@end

@interface Invisible : Item {
@private
    int opacity;
    LocalPlayer* _player;
}
@end
